// 司机相关类型定义

export interface Driver {
  id: number
  tenantId: number
  siteId: number
  driverNo: string
  name: string
  gender?: number
  phone: string
  idCard: string
  licenseType: string
  licenseNo: string
  licenseExpireDate: string
  entryDate: string
  emergencyContact?: string
  emergencyPhone?: string
  driverStatus: DriverStatus
  remark?: string
  // 站点信息（用于显示）
  siteName?: string
  siteCode?: string
  createTime: string
  updateTime: string
}

export type DriverStatus =
  | 'IDLE'       // 空闲
  | 'BUSY'       // 配送中
  | 'VACATION'   // 休假中
  | 'RESIGNED'   // 离职

export interface DriverFormData {
  name: string
  gender?: number
  phone: string
  idCard: string
  licenseType: string
  licenseNo: string
  licenseExpireDate: string
  entryDate: string
  emergencyContact?: string
  emergencyPhone?: string
  driverStatus?: DriverStatus
  remark?: string
  // 站点ID（可选，默认从当前用户获取）
  siteId?: number
}

// 司机状态配置
export const DRIVER_STATUS_CONFIG = {
  IDLE: { label: '空闲', color: 'green' },
  BUSY: { label: '配送中', color: 'blue' },
  VACATION: { label: '休假中', color: 'orange' },
  RESIGNED: { label: '离职', color: 'default' },
}

